package baseTest;

public class StringDemo {


    public static void main(String[] args) {
        String s1 = "abc";
        String s2 = new String("abc").intern();
        Animal a = new Dog();
        a.move();
    }
}

class Animal {
    public void move() {
        System.out.println("animal");
    }
}

class Dog extends Animal {
    public void move() {
        System.out.println("Dog");
    }
}